//
//  MoreSellTableViewCell.m
//  Wedding fantastic
//
//  Created by dllo on 15/7/9.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "MoreSellTableViewCell.h"

#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height

@implementation MoreSellTableViewCell
- (void)dealloc
{
    [_leftImage release];
    [_nameLabel release];
    [_worksLabel release];
    [_casesLabel release];
    [_fansLabel release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.leftImage = [[UIImageView alloc] init];
        self.leftImage.layer.masksToBounds = YES;
        self.leftImage.layer.cornerRadius = 10;
        self.leftImage.backgroundColor = [UIColor cyanColor];
        [self.contentView addSubview:self.leftImage];
        [_leftImage release];
        
        self.nameLabel = [[UILabel alloc] init];
        self.nameLabel.font = [UIFont systemFontOfSize:13];
        self.nameLabel.numberOfLines = 0;
        [self.contentView addSubview:self.nameLabel];
        [_nameLabel release];
        
        self.worksLabel = [[UILabel alloc] init];
        self.worksLabel.textColor = [UIColor grayColor];
        self.worksLabel.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:self.worksLabel];
        [_worksLabel release];
        
        self.casesLabel = [[UILabel alloc] init];
        self.casesLabel.textColor = [UIColor grayColor];
        self.casesLabel.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:self.casesLabel];
        [_casesLabel release];
        
        self.fansLabel = [[UILabel alloc] init];
        self.fansLabel.textColor = [UIColor grayColor];
        self.fansLabel.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:self.fansLabel];
        [_fansLabel release];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.leftImage.frame = CGRectMake(10 * WIDTH / 375, 10 * HEIGHT / 100, 150 * WIDTH / 375, 80 * HEIGHT / 100);
    self.nameLabel.frame = CGRectMake(170 * WIDTH / 375, 5 * HEIGHT / 100, 180 * WIDTH / 375, 50 * HEIGHT / 100);
    self.worksLabel.frame = CGRectMake(170 * WIDTH / 375, 65 * HEIGHT / 100, 50 * WIDTH / 375, 20 * HEIGHT / 100);
    self.casesLabel.frame = CGRectMake(240 * WIDTH / 375, 65 * HEIGHT / 100, 50 * WIDTH / 375, 20 * HEIGHT / 100);
    self.fansLabel.frame = CGRectMake(305 * WIDTH / 375, 65 * HEIGHT / 100, 70 * WIDTH / 375, 20 * HEIGHT / 100);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
